/*
 * Copyright 2020, GeoSolutions Sas.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree.
 */

// **************
// Theme
// **************

#gn-components-theme(@theme-vars) {
    .gn-home-section .gn-card-grid {
        .color-var(@theme-vars[main-color]);
        .background-color-var(@theme-vars[main-bg]);
    }
    .gn-card-grid {
        .color-var(@theme-vars[main-variant-color]);
        .background-color-var(@theme-vars[main-variant-bg]);
    }

    .gn-resource-status-warning {
        .background-color-var(@theme-vars[warning]);
        .color-var(@theme-vars[warning-contrast]);
    }
    .gn-resource-status-danger {
        .background-color-var(@theme-vars[danger]);
        .color-var(@theme-vars[danger-contrast]);
    }
    .gn-resource-status-pending {
        .color-var(@theme-vars[warning]);
    }
    .gn-resource-status-primary {
        .background-color-var(@theme-vars[primary]);
        .color-var(@theme-vars[primary-contrast]);
    }
    .gn-resource-status-success {
        .background-color-var(@theme-vars[success]);
        .color-var(@theme-vars[success-contrast]);
    }
}

// **************
// Layout
// **************

.gn-card-grid {
    padding-top: 20px;
    .gn-card-grid-container {
        position: relative;
        max-width: @gn-page-max-width;
        margin: auto;
        width: 100%;
        min-height: 100vh;
    }
    h3 {
        margin-left: 1rem;
        margin-top: 1rem;
        font-weight: 600;
        color: grey;
    }
    .gn-card-grid-container > ul {
        position: relative;
        list-style-type: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        max-width: @gn-page-max-width;
        margin: auto;
        width: 100%;
        li {
            padding: 0;
            margin: 0;
        }
        .gn-cards-loader {
            z-index: 2;
            background-color: rgba(255, 255, 255, 0.3);
            justify-content: unset;
            align-items: center;
            font-size: 0.5rem;
            .gn-main-event-content {
                position: sticky;
                top: 50%;
                transform: translateY(-50%);
            }
        }
    }
    .gn-card-grid-message {
        padding: 9rem 1rem;
        text-align: center;
        h1 {
            font-size: 2.75rem;
            margin-bottom: 2rem;
        }
        p {
            font-size: 2rem;
            font-weight: lighter;
            line-height: 2.5rem;
        }
        a {
            text-decoration: underline;
        }
    }
    .gn-card-grid-pagination {
        padding: 1rem;
        text-align: center;
        padding-bottom: 3rem;
    }
    .gn-card-grid-pagination.featured-list {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.5rem;
        button, button:focus {
            color: black;
            background: none;
            border: none;
            box-shadow: none !important;
            outline: none !important;
        }

    }
}

p.gn-resource-status-text {
    margin: 0;
}

.gn-resource-status {
    padding: 0.2em 0.5em;
    border-radius: 2px;
    font-size: @font-size-sm;
    margin-right: 0.25rem;
}

.gn-resource-status-pending {
    padding: 0;
    text-transform: uppercase;
    font-size: 1rem;
}
